package com.zhangck.bos2_0.action.transit;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Actions;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.zhangck.bos2_0.Service.transit.DeliveryInfoService;
import com.zhangck.bos2_0.Service.transit.SignInfoService;
import com.zhangck.bos2_0.common.BaseAction;
import com.zhangck.bos2_0.dao.Transit.SignInfoServiceRepository;

import cn.itcast.bos.domain.transit.SignInfo;

/** 
* @author 上午茶
* @version 创建时间：2018年6月20日 上午9:52:22 
* 类说明 
*/
@ParentPackage("json-default")
@Namespace("/")
@Scope("prototype")
@Actions
@Controller
public class SignInfoAction extends  BaseAction<SignInfo> {

	@Autowired
	private SignInfoService signInfoService;
	
	private String transitInfoId;

	public void setTransitInfoId(String transitInfoId) {
		this.transitInfoId = transitInfoId;
	} 
	@Action(value = "sing_save", results = { @Result(name = "success", type="redirect", location="./pages/transit/transitinfo.html") })
	public String sing_save() {
		System.out.println(transitInfoId);
		signInfoService.save(transitInfoId,model);
		
		return "success";
	}
}
